//
//  TNMarkHistoryTableViewCell.m
//  跑跑快销
//
//  Created by ylife on 14-4-30.
//  Copyright (c) 2014年 ylife. All rights reserved.
//
#define cellHeight 80
#import "TNMarkHistoryTableViewCell.h"

@implementation TNMarkHistoryTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self setFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, cellHeight)];
        [self createCell];
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)createCell
{
    _signImageView = [[UIImageView alloc]initWithFrame:CGRectMake(25 , self.frame.size.height / 4, self.frame.size.height / 2, self.frame.size.height / 2)];
    [self addSubview:_signImageView];
    
    _nameLable = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.height, 7, 170, self.frame.size.height / 2)];
    [_nameLable setFont:[UIFont systemFontOfSize:19]];

    [self addSubview:_nameLable];
    
    _signLable = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.height,  _nameLable.frame.size.height, 170, self.frame.size.height / 2 - 10)];
    [_signLable setTextColor:[UIColor grayColor]];
    [_signLable setFont:[UIFont systemFontOfSize:17]];
    [self addSubview:_signLable];
    
    _dateLable = [[UILabel alloc]initWithFrame:CGRectMake(260, 20, 60, self.frame.size.height - 20)];
    [_dateLable setTextColor:[UIColor grayColor]];
    [_dateLable setFont:[UIFont systemFontOfSize:17]];
    [self addSubview:_dateLable];
    
    UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(0, cellHeight - 1, 320, 1)];
    [lable setTextColor:[UIColor grayColor]];
    [lable setFont:[UIFont systemFontOfSize:7]];   //默认17
    lable.text = @"  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ";
    _highLineView = [[UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.height / 2, 0, 3 ,self.frame.size.height / 4)];
    _highLineView.image = [UIImage imageNamed:@"a.png"];
    _lowLineView = [[UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.height / 2, self.frame.size.height / 4 * 3,3 ,self.frame.size.height / 4)];
    _lowLineView.image = [UIImage imageNamed:@"a.png"];
    [self showHighLineView];
    [self showLowLineView];
    [self addSubview:lable];

}

- (void)showHighLineView
{
    [self addSubview:_highLineView];
}

- (void)hideHighLineView
{
    [_highLineView setHidden:YES];
}

- (void)showLowLineView
{
    [self addSubview:_lowLineView];
}

- (void)hideLowLineView
{
    [_lowLineView setHidden:YES];
}

@end
